import { ProDescriptions } from '@ant-design/pro-components';
import React from 'react';

const UserInfo: React.FC<any> = (props) => {
  const { user } = props;
  return (
    <>
      <ProDescriptions<API.Users>
        title={user?.name}
        dataSource={user}
        columns={[
          {
            title: '手机号',
            key: 'phone',
            dataIndex: 'phone',
            copyable: true,
          },
          {
            title: '邀请手机号',
            key: 'parentPhone',
            dataIndex: 'parentPhone',
          },
          {
            title: '授权编号',
            key: 'invite',
            dataIndex: 'invite',
            copyable: true,
          },
          {
            title: '代理等级',
            key: 'agentName',
            dataIndex: 'agentName',
            copyable: true,
          },
          {
            title: '邀请人',
            key: 'parentName',
            dataIndex: 'parentName',
          },
          {
            title: '金额',
            key: 'balance',
            dataIndex: 'balance',
            valueType: 'money',
          },
          {
            title: '授权编号',
            key: 'invite',
            dataIndex: 'invite',
            copyable: true,
          },
          {
            title: '身份证号',
            key: 'idCard',
            dataIndex: 'idCard',
            copyable: true,
          },
          {
            title: '联系地址',
            key: 'address',
            dataIndex: 'address',
            copyable: true,
          },
          {
            title: '微信平台号',
            key: 'openId',
            dataIndex: 'openId',
            valueType: 'password',
            copyable: true,
          },
        ]}
      ></ProDescriptions>
    </>
  );
};
export default UserInfo;
